 //回文字符串判断 
 #include<iostream>
 using namespace std;
 #include <string.h>
 int palindrome(char arr[],int i,int length)
 {
 	if(length == 0 || length == 1) return 1; //终止条件 
	if(i == length/2) return 1;//终止条件 
    if(arr[i]!=arr[length - i -1]) return 0;//终止条件 
	palindrome(arr,++i,length);	
  } 
 int main()
 {
 	int i = 0;
 	char arr[]="abcba";
 	int length = strlen(arr); 
 	if(palindrome(arr,i,length)) 
	cout<<"该字符串是回文！"<<endl;
 	else
 	cout<<"该字符串不是回文！"<<endl;
 	return 0;
 	
  }